﻿<Application
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:AppCore="clr-namespace:JustinAngel.UnitedNationsNews.AppCore" xmlns:local="clr-namespace:SliderApp" xmlns:unsupported="clr-namespace:Microsoft.Phone.Controls.Unsupported" xmlns:Microsoft_Unsupported="clr-namespace:Microsoft.Unsupported" 
    xmlns:smf="clr-namespace:Microsoft.SilverlightMediaFramework.Core;assembly=Microsoft.SilverlightMediaFramework.Core.Phone" xmlns:smf_converters="clr-namespace:Microsoft.SilverlightMediaFramework.Utilities.Converters;assembly=Microsoft.SilverlightMediaFramework.Utilities.Phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:Video="clr-namespace:JustinAngel.UnitedNationsNews.Pages.Video" xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" mc:Ignorable="d" 
    x:Class="JustinAngel.UnitedNationsNews.App"
    >

    <!--Application Resources-->
    <Application.Resources>
    	<ResourceDictionary>
    		<AppCore:ViewModelLocator x:Key="ViewModelLocator" />

    		<ControlTemplate x:Key="PhoneSimpleRepeatButton" TargetType="RepeatButton">
    			<Rectangle/>
    		</ControlTemplate>

    		<ControlTemplate x:Key="PhoneSimpleThumbHorizontal" TargetType="Thumb">
    			<Border Background="Transparent" Margin="-480,-18">
    				<Rectangle Fill="{StaticResource PhoneForegroundBrush}" Margin="480,12,473,39" RadiusX="2" RadiusY="2"/>
    			</Border>
    		</ControlTemplate>

    		<ControlTemplate x:Key="PhoneSimpleThumbVertical" TargetType="Thumb">
    			<Border Background="Transparent" Margin="-6,-800">
    				<Rectangle Width="6" Height="2" Margin="24,0,0,0" Fill="{StaticResource PhoneForegroundBrush}"/>
    			</Border>
    		</ControlTemplate>

    		<Style x:Key="sliderStyle" TargetType="local:PhoneSlider">
    			<Setter Property="BorderThickness" Value="0"/>
    			<Setter Property="BorderBrush" Value="Transparent"/>
    			<Setter Property="Maximum" Value="10"/>
    			<Setter Property="Minimum" Value="0"/>
    			<Setter Property="Value" Value="0"/>
    			<Setter Property="Margin" Value="{StaticResource PhoneHorizontalMargin}"/>
    			<Setter Property="Background" Value="{StaticResource PhoneContrastBackgroundBrush}"/>
    			<Setter Property="Foreground" Value="{StaticResource PhoneAccentBrush}"/>
    			<Setter Property="Template">
    				<Setter.Value>
    					<ControlTemplate TargetType="local:PhoneSlider">
    						<Grid Background="Transparent">
    							<VisualStateManager.VisualStateGroups>
    								<VisualStateGroup x:Name="CommonStates">
    									<VisualState x:Name="Normal"/>
    									<VisualState x:Name="MouseOver"/>
    									<VisualState x:Name="Disabled">
    										<Storyboard>
    											<DoubleAnimation Duration="0" Storyboard.TargetName="HorizontalTrack" Storyboard.TargetProperty="Opacity" To="0.1" />
    											<DoubleAnimation Duration="0" Storyboard.TargetName="VerticalTrack" Storyboard.TargetProperty="Opacity" To="0.1" />
    											<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HorizontalFill" Storyboard.TargetProperty="Fill">
    												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}" />
    											</ObjectAnimationUsingKeyFrames>
    											<ObjectAnimationUsingKeyFrames Storyboard.TargetName="VerticalFill" Storyboard.TargetProperty="Fill">
    												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}" />
    											</ObjectAnimationUsingKeyFrames>
    										</Storyboard>
    									</VisualState>
    								</VisualStateGroup>
    							</VisualStateManager.VisualStateGroups>
    							<Grid x:Name="HorizontalTemplate">
    								<Grid.ColumnDefinitions>
    									<ColumnDefinition Width="*"/>
    									<ColumnDefinition Width="0"/>
    									<ColumnDefinition Width="auto"/>
    								</Grid.ColumnDefinitions>
    								<Rectangle x:Name="HorizontalTrack" IsHitTestVisible="False" Fill="{TemplateBinding Background}" Opacity="0.2" Grid.ColumnSpan="3" Height="12" Margin="0,22,0,50"/>
    								<Rectangle x:Name="HorizontalFill" IsHitTestVisible="False" Fill="#FF5B92E5" Grid.Column="0" Height="12" Margin="0,22,0,50"/>
    								<RepeatButton x:Name="HorizontalTrackLargeChangeDecreaseRepeatButton" IsTabStop="False" Template="{StaticResource PhoneSimpleRepeatButton}" Grid.Column="0" />
    								<RepeatButton x:Name="HorizontalTrackLargeChangeIncreaseRepeatButton" IsTabStop="False" Template="{StaticResource PhoneSimpleRepeatButton}" Grid.Column="2" />
    								<Thumb x:Name="HorizontalThumb" Width="1" Margin="-1,0,0,0" Grid.Column="1" Template="{StaticResource PhoneSimpleThumbHorizontal}" RenderTransformOrigin="0.5,0.5" CacheMode="BitmapCache"/>
    							</Grid>
    							<Grid x:Name="VerticalTemplate">
    								<Grid.RowDefinitions>
    									<RowDefinition Height="*"/>
    									<RowDefinition Height="0"/>
    									<RowDefinition Height="Auto"/>
    								</Grid.RowDefinitions>
    								<Rectangle x:Name="VerticalTrack" IsHitTestVisible="False" Fill="{TemplateBinding Background}" Opacity="0.2" Grid.RowSpan="3" Width="12" Margin="24,0"/>
    								<Rectangle x:Name="VerticalFill" IsHitTestVisible="False" Fill="{TemplateBinding Foreground}" Grid.Row="2" Width="12" Margin="24,0"/>
    								<RepeatButton x:Name="VerticalTrackLargeChangeDecreaseRepeatButton" IsTabStop="False" Template="{StaticResource PhoneSimpleRepeatButton}" Grid.Row="0"/>
    								<RepeatButton x:Name="VerticalTrackLargeChangeIncreaseRepeatButton" IsTabStop="False" Template="{StaticResource PhoneSimpleRepeatButton}" Grid.Row="2"/>
    								<Thumb x:Name="VerticalThumb" Height="1" Margin="0,-1,0,0" Grid.Row="1" Template="{StaticResource PhoneSimpleThumbVertical}" RenderTransformOrigin="0.5,0.5" CacheMode="BitmapCache"/>
    							</Grid>
    						</Grid>
    					</ControlTemplate>
    				</Setter.Value>
    			</Setter>
            

    		</Style>

    		<Style x:Key="PerformanceProgressBar" TargetType="ProgressBar">
    			<Setter Property="Foreground" Value="#FF1BA1E2"/>
    			<Setter Property="Background" Value="{StaticResource PhoneAccentBrush}"/>
    			<Setter Property="Maximum" Value="100"/>
    			<Setter Property="IsHitTestVisible" Value="False"/>
    			<Setter Property="Padding" Value="{StaticResource PhoneHorizontalMargin}"/>
    			<Setter Property="Template">
    				<Setter.Value>
    					<ControlTemplate TargetType="ProgressBar">
    						<unsupported:RelativeAnimatingContentControl HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
    							<unsupported:RelativeAnimatingContentControl.Resources>
    								<ExponentialEase EasingMode="EaseOut" Exponent="1" x:Key="ProgressBarEaseOut"/>
    								<ExponentialEase EasingMode="EaseIn" Exponent="1" x:Key="ProgressBarEaseIn"/>
    							</unsupported:RelativeAnimatingContentControl.Resources>
    							<VisualStateManager.VisualStateGroups>
    								<VisualStateGroup x:Name="CommonStates">
    									<VisualState x:Name="Determinate"/>
    									<VisualState x:Name="Indeterminate">
    										<Storyboard RepeatBehavior="Forever" Duration="00:00:04.4">
    											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="IndeterminateRoot">
    												<DiscreteObjectKeyFrame KeyTime="0">
    													<DiscreteObjectKeyFrame.Value>
    														<Visibility>Visible</Visibility>
    													</DiscreteObjectKeyFrame.Value>
    												</DiscreteObjectKeyFrame>
    											</ObjectAnimationUsingKeyFrames>
    											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DeterminateRoot">
    												<DiscreteObjectKeyFrame KeyTime="0">
    													<DiscreteObjectKeyFrame.Value>
    														<Visibility>Collapsed</Visibility>
    													</DiscreteObjectKeyFrame.Value>
    												</DiscreteObjectKeyFrame>
    											</ObjectAnimationUsingKeyFrames>
    											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.0" Storyboard.TargetProperty="X" Storyboard.TargetName="R1TT">
    												<LinearDoubleKeyFrame KeyTime="00:00:00.0" Value="0.1"/>
    												<EasingDoubleKeyFrame KeyTime="00:00:00.5" Value="33.1" EasingFunction="{StaticResource ProgressBarEaseOut}"/>
    												<LinearDoubleKeyFrame KeyTime="00:00:02.0" Value="66.1"/>
    												<EasingDoubleKeyFrame KeyTime="00:00:02.5" Value="100.1" EasingFunction="{StaticResource ProgressBarEaseIn}"/>
    											</DoubleAnimationUsingKeyFrames>
    											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.2" Storyboard.TargetProperty="X" Storyboard.TargetName="R2TT">
    												<LinearDoubleKeyFrame KeyTime="00:00:00.0" Value="0.1"/>
    												<EasingDoubleKeyFrame KeyTime="00:00:00.5" Value="33.1" EasingFunction="{StaticResource ProgressBarEaseOut}"/>
    												<LinearDoubleKeyFrame KeyTime="00:00:02.0" Value="66.1"/>
    												<EasingDoubleKeyFrame KeyTime="00:00:02.5" Value="100.1" EasingFunction="{StaticResource ProgressBarEaseIn}"/>
    											</DoubleAnimationUsingKeyFrames>
    											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.4" Storyboard.TargetProperty="X" Storyboard.TargetName="R3TT">
    												<LinearDoubleKeyFrame KeyTime="00:00:00.0" Value="0.1"/>
    												<EasingDoubleKeyFrame KeyTime="00:00:00.5" Value="33.1" EasingFunction="{StaticResource ProgressBarEaseOut}"/>
    												<LinearDoubleKeyFrame KeyTime="00:00:02.0" Value="66.1"/>
    												<EasingDoubleKeyFrame KeyTime="00:00:02.5" Value="100.1" EasingFunction="{StaticResource ProgressBarEaseIn}"/>
    											</DoubleAnimationUsingKeyFrames>
    											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.6" Storyboard.TargetProperty="X" Storyboard.TargetName="R4TT">
    												<LinearDoubleKeyFrame KeyTime="00:00:00.0" Value="0.1"/>
    												<EasingDoubleKeyFrame KeyTime="00:00:00.5" Value="33.1" EasingFunction="{StaticResource ProgressBarEaseOut}"/>
    												<LinearDoubleKeyFrame KeyTime="00:00:02.0" Value="66.1"/>
    												<EasingDoubleKeyFrame KeyTime="00:00:02.5" Value="100.1" EasingFunction="{StaticResource ProgressBarEaseIn}"/>
    											</DoubleAnimationUsingKeyFrames>
    											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.8" Storyboard.TargetProperty="X" Storyboard.TargetName="R5TT">
    												<LinearDoubleKeyFrame KeyTime="00:00:00.0" Value="0.1"/>
    												<EasingDoubleKeyFrame KeyTime="00:00:00.5" Value="33.1" EasingFunction="{StaticResource ProgressBarEaseOut}"/>
    												<LinearDoubleKeyFrame KeyTime="00:00:02.0" Value="66.1"/>
    												<EasingDoubleKeyFrame KeyTime="00:00:02.5" Value="100.1" EasingFunction="{StaticResource ProgressBarEaseIn}"/>
    											</DoubleAnimationUsingKeyFrames>
    											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="R1">
    												<DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
    												<DiscreteDoubleKeyFrame KeyTime="00:00:02.5" Value="0"/>
    											</DoubleAnimationUsingKeyFrames>
    											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.2" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="R2">
    												<DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
    												<DiscreteDoubleKeyFrame KeyTime="00:00:02.5" Value="0"/>
    											</DoubleAnimationUsingKeyFrames>
    											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.4" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="R3">
    												<DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
    												<DiscreteDoubleKeyFrame KeyTime="00:00:02.5" Value="0"/>
    											</DoubleAnimationUsingKeyFrames>
    											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.6" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="R4">
    												<DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
    												<DiscreteDoubleKeyFrame KeyTime="00:00:02.5" Value="0"/>
    											</DoubleAnimationUsingKeyFrames>
    											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.8" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="R5">
    												<DiscreteDoubleKeyFrame KeyTime="0" Value="1"/>
    												<DiscreteDoubleKeyFrame KeyTime="00:00:02.5" Value="0"/>
    											</DoubleAnimationUsingKeyFrames>
    										</Storyboard>
    									</VisualState>
    								</VisualStateGroup>
    							</VisualStateManager.VisualStateGroups>
    							<Grid>
    								<Grid x:Name="DeterminateRoot" Margin="{TemplateBinding Padding}" Visibility="Visible">
    									<Rectangle x:Name="ProgressBarTrack" Fill="{TemplateBinding Background}" Height="4" Opacity="0.1"/>
    									<Rectangle x:Name="ProgressBarIndicator" Fill="{TemplateBinding Foreground}" HorizontalAlignment="Left" Height="4"/>
    								</Grid>
    								<Border x:Name="IndeterminateRoot" Margin="{TemplateBinding Padding}" Visibility="Collapsed">
    									<Grid HorizontalAlignment="Left">
    										<Rectangle Fill="{TemplateBinding Foreground}" Height="8" IsHitTestVisible="False" Width="8" x:Name="R1" Opacity="0" CacheMode="BitmapCache">
    											<Rectangle.RenderTransform>
    												<TranslateTransform x:Name="R1TT"/>
    											</Rectangle.RenderTransform>
    										</Rectangle>
    										<Rectangle Fill="{TemplateBinding Foreground}" Height="8" IsHitTestVisible="False" Width="8" x:Name="R2" Opacity="0" CacheMode="BitmapCache">
    											<Rectangle.RenderTransform>
    												<TranslateTransform x:Name="R2TT"/>
    											</Rectangle.RenderTransform>
    										</Rectangle>
    										<Rectangle Fill="{TemplateBinding Foreground}" Height="8" IsHitTestVisible="False" Width="8" x:Name="R3" Opacity="0" CacheMode="BitmapCache">
    											<Rectangle.RenderTransform>
    												<TranslateTransform x:Name="R3TT"/>
    											</Rectangle.RenderTransform>
    										</Rectangle>
    										<Rectangle Fill="{TemplateBinding Foreground}" Height="8" IsHitTestVisible="False" Width="8" x:Name="R4" Opacity="0" CacheMode="BitmapCache">
    											<Rectangle.RenderTransform>
    												<TranslateTransform x:Name="R4TT"/>
    											</Rectangle.RenderTransform>
    										</Rectangle>
    										<Rectangle Fill="{TemplateBinding Foreground}" Height="8" IsHitTestVisible="False" Width="8" x:Name="R5" Opacity="0" CacheMode="BitmapCache">
    											<Rectangle.RenderTransform>
    												<TranslateTransform x:Name="R5TT"/>
    											</Rectangle.RenderTransform>
    										</Rectangle>
    									</Grid>
    								</Border>
    							</Grid>
    						</unsupported:RelativeAnimatingContentControl>
    					</ControlTemplate>
    				</Setter.Value>
    			</Setter>
    		</Style>
    		<Style x:Key="EmptyButtonStyle" TargetType="Button">
    			<Setter Property="Background" Value="Transparent"/>
    			<Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/>
    			<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
    			<Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/>
    			<Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiBold}"/>
    			<Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMediumLarge}"/>
    			<Setter Property="Padding" Value="0"/>
    			<Setter Property="Template">
    				<Setter.Value>
    					<ControlTemplate TargetType="Button">
    						<Grid Background="Transparent">
    							<VisualStateManager.VisualStateGroups>
    								<VisualStateGroup x:Name="CommonStates">
    									<VisualState x:Name="Normal"/>
    									<VisualState x:Name="MouseOver"/>
    									<VisualState x:Name="Pressed" />
    									<VisualState x:Name="Disabled" />
    								</VisualStateGroup>
    							</VisualStateManager.VisualStateGroups>
    							<Border x:Name="ButtonBackground" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" CornerRadius="0">
    								<ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
    							</Border>
    						</Grid>
    					</ControlTemplate>
    				</Setter.Value>
    			</Setter>
    		</Style>
    		<Style x:Key="ReplayButtonStyle" TargetType="Button">
    			<Setter Property="Background" Value="#FF1F3B53"/>
    			<Setter Property="Foreground" Value="#FF000000"/>
    			<Setter Property="Padding" Value="3"/>
    			<Setter Property="BorderThickness" Value="1"/>
    			<Setter Property="BorderBrush">
    				<Setter.Value>
    					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    						<GradientStop Color="#FFA3AEB9" Offset="0"/>
    						<GradientStop Color="#FF8399A9" Offset="0.375"/>
    						<GradientStop Color="#FF718597" Offset="0.375"/>
    						<GradientStop Color="#FF617584" Offset="1"/>
    					</LinearGradientBrush>
    				</Setter.Value>
    			</Setter>
    			<Setter Property="Template">
    				<Setter.Value>
    					<ControlTemplate TargetType="Button">
    						<Grid>
    							<VisualStateManager.VisualStateGroups>
    								<VisualStateGroup x:Name="CommonStates">
    									<VisualState x:Name="Normal"/>
    									<VisualState x:Name="MouseOver"/>
    									<VisualState x:Name="Pressed">
    										<Storyboard>
    											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
    												<DiscreteObjectKeyFrame KeyTime="0">
    													<DiscreteObjectKeyFrame.Value>
    														<Visibility>Collapsed</Visibility>
    													</DiscreteObjectKeyFrame.Value>
    												</DiscreteObjectKeyFrame>
    											</ObjectAnimationUsingKeyFrames>
    											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image1">
    												<DiscreteObjectKeyFrame KeyTime="0">
    													<DiscreteObjectKeyFrame.Value>
    														<Visibility>Visible</Visibility>
    													</DiscreteObjectKeyFrame.Value>
    												</DiscreteObjectKeyFrame>
    											</ObjectAnimationUsingKeyFrames>
    										</Storyboard>
    									</VisualState>
    									<VisualState x:Name="Disabled"/>
    								</VisualStateGroup>
    							</VisualStateManager.VisualStateGroups>
    							<Image x:Name="image" Margin="12" Source="/Microsoft.SilverlightMediaFramework.Core.Phone;component/Images/replay_normal.png">
    								<VisualStateManager.VisualStateGroups>
    									<VisualStateGroup x:Name="CommonStates1">
    										<VisualState x:Name="Normal1"/>
    										<VisualState x:Name="MouseOver1"/>
    										<VisualState x:Name="Pressed1"/>
    										<VisualState x:Name="Disabled1"/>
    									</VisualStateGroup>
    								</VisualStateManager.VisualStateGroups>
    							</Image>
    							<Image x:Name="image1" Margin="12" Source="/Microsoft.SilverlightMediaFramework.Core.Phone;component/Images/replay_pressed.png" Visibility="Collapsed">
    								<VisualStateManager.VisualStateGroups>
    									<VisualStateGroup x:Name="CommonStates2">
    										<VisualState x:Name="Normal2"/>
    										<VisualState x:Name="MouseOver2"/>
    										<VisualState x:Name="Pressed2"/>
    										<VisualState x:Name="Disabled2"/>
    									</VisualStateGroup>
    								</VisualStateManager.VisualStateGroups>
    							</Image>
    						</Grid>
    					</ControlTemplate>
    				</Setter.Value>
    			</Setter>
    		</Style>
    		<Style x:Key="ThumbStyle" TargetType="Thumb">
    			<Setter Property="Template">
    				<Setter.Value>
    					<ControlTemplate TargetType="Thumb">
    						<Rectangle x:Name="rectangle" Fill="White" Margin="0,15">
    							<VisualStateManager.VisualStateGroups>
    								<VisualStateGroup x:Name="CommonStates">
    									<VisualState x:Name="Normal"/>
    									<VisualState x:Name="MouseOver"/>
    									<VisualState x:Name="Pressed"/>
    									<VisualState x:Name="Disabled"/>
    								</VisualStateGroup>
    							</VisualStateManager.VisualStateGroups>
    						</Rectangle>
    					</ControlTemplate>
    				</Setter.Value>
    			</Setter>
    		</Style>
    		<Style x:Key="SMFTimelineStyle1" TargetType="smf:Timeline">
    			<Setter Property="Template">
    				<Setter.Value>
    					<ControlTemplate TargetType="smf:Timeline">
    						<Grid x:Name="MainLayout">
    							<VisualStateManager.VisualStateGroups>
    								<VisualStateGroup x:Name="CommonStates">
    									<VisualStateGroup.Transitions>
    										<VisualTransition GeneratedDuration="0:0:0.25"/>
    									</VisualStateGroup.Transitions>
    									<VisualState x:Name="Normal"/>
    									<VisualState x:Name="MouseOver"/>
    									<VisualState x:Name="Disabled">
    										<Storyboard>
    											<DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainLayout"/>
    										</Storyboard>
    									</VisualState>
    								</VisualStateGroup>
    								<VisualStateGroup x:Name="FocusStates">
    									<VisualStateGroup.Transitions>
    										<VisualTransition GeneratedDuration="0:0:0.25"/>
    									</VisualStateGroup.Transitions>
    									<VisualState x:Name="Unfocused"/>
    									<VisualState x:Name="Focused"/>
    								</VisualStateGroup>
    								<VisualStateGroup x:Name="LiveStates">
    									<VisualState x:Name="Live">
    										<Storyboard>
    											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="HorizontalAvailableBar">
    												<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
    											</DoubleAnimationUsingKeyFrames>
    										</Storyboard>
    									</VisualState>
    									<VisualState x:Name="Vod">
    										<Storyboard>
    											<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="HorizontalAvailableBar">
    												<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
    											</DoubleAnimationUsingKeyFrames>
    										</Storyboard>
    									</VisualState>
    								</VisualStateGroup>
    								<VisualStateGroup x:Name="ScrubbingStates">
    									<VisualState x:Name="IsScrubbing">
    										<Storyboard>
    											<DoubleAnimation Duration="0" To="2" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="HorizontalThumb" d:IsOptimized="True"/>
    										</Storyboard>
    									</VisualState>
    									<VisualState x:Name="IsNotScrubbing"/>
    								</VisualStateGroup>
    							</VisualStateManager.VisualStateGroups>
    							<Grid x:Name="HorizontalTemplate" Background="Transparent" Height="37" IsHitTestVisible="True" Margin="1,0" VerticalAlignment="Center">
    								<Grid.ColumnDefinitions>
    									<ColumnDefinition Width="Auto"/>
    									<ColumnDefinition Width="Auto"/>
    									<ColumnDefinition Width="*"/>
    								</Grid.ColumnDefinitions>
    								<RepeatButton x:Name="HorizontalTrackLargeChangeIncreaseRepeatButton" BorderBrush="{x:Null}" Grid.Column="2" Foreground="{x:Null}" IsHitTestVisible="False" Margin="0,0,1,0">
    									<RepeatButton.Template>
    										<ControlTemplate>
    											<Rectangle Fill="#FF333333" Margin="0,15" StrokeThickness="0.5"/>
    										</ControlTemplate>
    									</RepeatButton.Template>
    								</RepeatButton>
    								<Border x:Name="HorizontalAvailableBar" BorderThickness="0" Background="#FF5B92E5" Grid.ColumnSpan="3" HorizontalAlignment="Left" Height="7" Margin="1,0,0,0" Opacity="0" Padding="0"/>
    								<RepeatButton x:Name="HorizontalTrackLargeChangeDecreaseRepeatButton" BorderBrush="{x:Null}" Grid.Column="0" Foreground="{x:Null}" IsHitTestVisible="False" IsTabStop="False" Margin="1,0,0,0">
    									<RepeatButton.Template>
    										<ControlTemplate>
    											<Rectangle Fill="#FF5B92E5" Margin="0,15" StrokeThickness="0.5"/>
    										</ControlTemplate>
    									</RepeatButton.Template>
    								</RepeatButton>
    								<smf:MarkerItemsControl Grid.ColumnSpan="3" Grid.Column="0" EndPosition="{TemplateBinding EndPosition}" IsLive="{TemplateBinding IsLive}" ItemsSource="{TemplateBinding Markers}" LivePosition="{TemplateBinding LivePosition}" RenderTransformOrigin="0.5,0.5" StartPosition="{TemplateBinding StartPosition}" ThumbWidth="{Binding Width, ElementName=HorizontalThumb}"/>
    								<Thumb x:Name="HorizontalThumb" Background="#00FFFFFF" Grid.Column="1" Height="Auto" RenderTransformOrigin="0.5,0.5" Style="{StaticResource ThumbStyle}" Width="30">
    									<Thumb.RenderTransform>
    										<CompositeTransform/>
    									</Thumb.RenderTransform>
    								</Thumb>
    								<Border BorderBrush="White" BorderThickness="1" Grid.ColumnSpan="3" CornerRadius="2" Margin="0,14"/>
    							</Grid>
    						</Grid>
    					</ControlTemplate>
    				</Setter.Value>
    			</Setter>
    		</Style>
		
    		<Style x:Key="SMFPlayerStyle1" TargetType="smf:SMFPlayer">
    			<Setter Property="Background" Value="Black"/>
    			<Setter Property="HorizontalAlignment" Value="Stretch"/>
    			<Setter Property="VerticalAlignment" Value="Stretch"/>
    			<Setter Property="Template">
    				<Setter.Value>
    					<ControlTemplate TargetType="smf:SMFPlayer">
    						<Grid>
    							<Grid.Resources>
    								<Video:TimeSpanValueConverter x:Key="TimeSpanValueConverter"/>
    							</Grid.Resources>
    							<VisualStateManager.VisualStateGroups>
							
    								<VisualStateGroup x:Name="PlayStates">
    									<VisualState x:Name="AcquiringLicense"/>
    									<VisualState x:Name="Buffering"/>
    									<VisualState x:Name="ClipPlaying">
    										<Storyboard>
    											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="ReplayElement">
    												<DiscreteObjectKeyFrame KeyTime="0">
    													<DiscreteObjectKeyFrame.Value>
    														<sys:Boolean>False</sys:Boolean>
    													</DiscreteObjectKeyFrame.Value>
    												</DiscreteObjectKeyFrame>
    											</ObjectAnimationUsingKeyFrames>
    											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="PlayElement">
    												<DiscreteObjectKeyFrame KeyTime="0">
    													<DiscreteObjectKeyFrame.Value>
    														<sys:Boolean>False</sys:Boolean>
    													</DiscreteObjectKeyFrame.Value>
    												</DiscreteObjectKeyFrame>
    											</ObjectAnimationUsingKeyFrames>
    											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.IsEnabled)" Storyboard.TargetName="TimelineElement">
    												<DiscreteObjectKeyFrame KeyTime="0">
    													<DiscreteObjectKeyFrame.Value>
    														<sys:Boolean>False</sys:Boolean>
    													</DiscreteObjectKeyFrame.Value>
    												</DiscreteObjectKeyFrame>
    											</ObjectAnimationUsingKeyFrames>
    											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" Storyboard.TargetName="TimelineElement">
    												<DiscreteObjectKeyFrame KeyTime="0">
    													<DiscreteObjectKeyFrame.Value>
    														<sys:Boolean>False</sys:Boolean>
    													</DiscreteObjectKeyFrame.Value>
    												</DiscreteObjectKeyFrame>
    											</ObjectAnimationUsingKeyFrames>
    										</Storyboard>
    									</VisualState>
    									<VisualState x:Name="Closed"/>
    									<VisualState x:Name="Individualizing"/>
    									<VisualState x:Name="Opening"/>
    									<VisualState x:Name="Paused"/>
    									<VisualState x:Name="Playing"/>
    									<VisualState x:Name="Stopped"/>
    								</VisualStateGroup>
    								<VisualStateGroup x:Name="PosterStates">
    									<VisualState x:Name="PosterHidden">
    										<Storyboard>
    											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Poster">
    												<DiscreteObjectKeyFrame KeyTime="0">
    													<DiscreteObjectKeyFrame.Value>
    														<Visibility>Collapsed</Visibility>
    													</DiscreteObjectKeyFrame.Value>
    												</DiscreteObjectKeyFrame>
    											</ObjectAnimationUsingKeyFrames>
    										</Storyboard>
    									</VisualState>
    									<VisualState x:Name="PosterVisible">
    										<Storyboard>
    											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Poster">
    												<DiscreteObjectKeyFrame KeyTime="0">
    													<DiscreteObjectKeyFrame.Value>
    														<Visibility>Visible</Visibility>
    													</DiscreteObjectKeyFrame.Value>
    												</DiscreteObjectKeyFrame>
    											</ObjectAnimationUsingKeyFrames>
    										</Storyboard>
    									</VisualState>
    								</VisualStateGroup>
    								<VisualStateGroup x:Name="ControlStripStates">
    									<VisualStateGroup.Transitions>
    										<VisualTransition GeneratedDuration="0:0:0.3" To="ControlStripNotVisible">
    											<Storyboard>
    												<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ControllerContainer">
    													<DiscreteObjectKeyFrame KeyTime="0:0:0.4">
    														<DiscreteObjectKeyFrame.Value>
    															<Visibility>Collapsed</Visibility>
    														</DiscreteObjectKeyFrame.Value>
    													</DiscreteObjectKeyFrame>
    												</ObjectAnimationUsingKeyFrames>
    											</Storyboard>
    										</VisualTransition>
    										<VisualTransition GeneratedDuration="0:0:0.3" To="ControlStripVisible"/>
    									</VisualStateGroup.Transitions>
    									<VisualState x:Name="ControlStripVisible">
    										<Storyboard>
    											<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ControllerContainer">
    												<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
    												<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
    											</DoubleAnimationUsingKeyFrames>
    										</Storyboard>
    									</VisualState>
    									<VisualState x:Name="ControlStripNotVisible">
    										<Storyboard>
    											<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ControllerContainer" d:IsOptimized="True"/>
    											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ControllerContainer">
    												<DiscreteObjectKeyFrame KeyTime="0">
    													<DiscreteObjectKeyFrame.Value>
    														<Visibility>Collapsed</Visibility>
    													</DiscreteObjectKeyFrame.Value>
    												</DiscreteObjectKeyFrame>
    											</ObjectAnimationUsingKeyFrames>
    										</Storyboard>
    									</VisualState>
    								</VisualStateGroup>
    							</VisualStateManager.VisualStateGroups>
    							<Grid x:Name="PlayerRoot" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" Height="{TemplateBinding Height}" Margin="0" VerticalAlignment="{TemplateBinding VerticalAlignment}" Width="{TemplateBinding Width}">
    								<ContentControl x:Name="MediaPresenterElement" HorizontalContentAlignment="Stretch" Height="{TemplateBinding VideoHeight}" IsHitTestVisible="True" Grid.Row="0" VerticalContentAlignment="Stretch" Width="{TemplateBinding VideoWidth}"/>
    								<Image x:Name="Poster" DataContext="{TemplateBinding CurrentPlaylistItem}" Height="{TemplateBinding VideoHeight}" IsHitTestVisible="False" Source="{Binding ThumbSource}" Visibility="Collapsed" Width="{TemplateBinding VideoWidth}"/>
    								<Button x:Name="ControlStripToggleElement" BorderBrush="{x:Null}" Content="Button" Foreground="{x:Null}" Opacity="0"/>
    								<Grid x:Name="ControllerContainer" Background="#7F000000" VerticalAlignment="Bottom">
    									<Grid.RowDefinitions>
    										<RowDefinition Height="Auto"/>
    										<RowDefinition/>
    										<RowDefinition Height="Auto"/>
    									</Grid.RowDefinitions>
    									<TextBlock x:Name="title" Foreground="White" FontSize="{StaticResource PhoneFontSizeLarge}" FontFamily="{StaticResource PhoneFontFamilySemiBold}" Margin="32,5,0,0" TextWrapping="Wrap" Text="{Binding CurrentPlaylistItem.Title, RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Center"/>
    									<StackPanel x:Name="playercontrols" HorizontalAlignment="Center" Margin="0" Orientation="Horizontal" Grid.Row="1" VerticalAlignment="Center" Height="87">
                                            <Button Microsoft_Unsupported:TiltEffect.IsTiltEnabled="True" x:Name="ReplayElement" BorderThickness="0" Height="72" Margin="20,0,0,0" Style="{StaticResource ReplayButtonStyle}" Width="72"/>
                                            <smf:PlayElement x:Name="PlayElement" Microsoft_Unsupported:TiltEffect.IsTiltEnabled="True" Cursor="Hand" Height="72" Margin="20,0,0,0" PlayState="{TemplateBinding PlayState}" Width="72"/>
    									</StackPanel>
    									<Grid x:Name="timelinecontrols" Grid.ColumnSpan="1" Grid.Column="1" Margin="16,15,16,40" Grid.Row="2">
    										<Grid.ColumnDefinitions>
    											<ColumnDefinition Width="Auto"/>
    											<ColumnDefinition/>
    											<ColumnDefinition Width="Auto" MinWidth="86"/>
    										</Grid.ColumnDefinitions>
											<!-- Converter={StaticResource TimeSpanValueConverter}, -->
    										<TextBlock x:Name="CurrentPositionElement" Foreground="White" FontSize="{StaticResource PhoneFontSizeSmall}" FontFamily="Segoe UI Semibold" HorizontalAlignment="Right" Margin="0,0,9,3" TextAlignment="Right" Text="{Binding PlaybackPosition, Converter={StaticResource TimeSpanValueConverter},  RelativeSource={RelativeSource TemplatedParent}}" VerticalAlignment="Center" Width="72"/>
    										<smf:Timeline x:Name="TimelineElement" Cursor="Hand" Chapters="{TemplateBinding Chapters}" Grid.Column="1" EndPosition="{TemplateBinding EndPosition}" Foreground="{x:Null}" HorizontalContentAlignment="Stretch" IsLive="{TemplateBinding IsMediaLive}" LivePosition="{TemplateBinding LivePosition}" Margin="0" StartPosition="{TemplateBinding StartPosition}" TimelineMarkers="{TemplateBinding TimelineMarkers}" VerticalAlignment="Center" Style="{StaticResource SMFTimelineStyle1}"/>
    										<TextBlock x:Name="CurrentDurationElement" Grid.Column="2" Foreground="White" FontSize="{StaticResource PhoneFontSizeNormal}" FontFamily="Segoe UI Semibold" HorizontalAlignment="Left" Margin="9,5,0,5" Opacity="0.4" Text="{Binding EndPosition, Converter={StaticResource TimeSpanValueConverter}, RelativeSource={RelativeSource TemplatedParent}}" Width="77" d:LayoutOverrides="Height"/>
    									</Grid>
    								</Grid>
    							</Grid>
    						</Grid>
    					</ControlTemplate>
    				</Setter.Value>
    			</Setter>
    		</Style>
		
    		<DataTemplate x:Key="ArticleItemDataTemplate">
                <StackPanel Orientation="Horizontal" Margin="0,0,0,17" Microsoft_Unsupported:TiltEffect.IsTiltEnabled="True" Height="Auto" Width="Auto">
                    <toolkit:ContextMenuService.ContextMenu>
                        <toolkit:ContextMenu IsZoomEnabled="False" Background="White" BorderBrush="Black" Foreground="Black">
                            <toolkit:MenuItem Command="{Binding NavigateToArticle}" Header="read article" Microsoft_Unsupported:TiltEffect.IsTiltEnabled="True"/>
                            <toolkit:MenuItem Command="{Binding ShareViaEmail}" Header="share via email" Microsoft_Unsupported:TiltEffect.IsTiltEnabled="True"/>
                            <toolkit:MenuItem Command="{Binding ShareOnFacebook}" Header="share on facebook" Microsoft_Unsupported:TiltEffect.IsTiltEnabled="True"/>
                            <toolkit:MenuItem Command="{Binding ShareOnTwitter}" Header="share on twitter" Microsoft_Unsupported:TiltEffect.IsTiltEnabled="True"/>
                        </toolkit:ContextMenu>
                    </toolkit:ContextMenuService.ContextMenu>
                    <Rectangle Height="120" Width="180" Fill="#FF5B92E5" Margin="12,0,9,0"/>
    				<Image Height="120" Width="180" Source="{Binding ImageUrl}" Margin="-189,0,9,0"/>
    				<TextBlock Width="219" Foreground="Black" Text="{Binding Title}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" FontSize="{StaticResource PhoneFontSizeMedium}" FontFamily="{StaticResource PhoneFontFamilyNormal}"/>
    			</StackPanel>
    		</DataTemplate>
        
    	</ResourceDictionary>
        
    </Application.Resources>

    <Application.ApplicationLifetimeObjects>
        <!--Required object that handles lifetime events for the application-->
        <shell:PhoneApplicationService 
            Launching="Application_Launching" Closing="Application_Closing" 
            Activated="Application_Activated" Deactivated="Application_Deactivated"/>
    </Application.ApplicationLifetimeObjects>

</Application>